package com.example.demo.admin.gecco.crawler.mzt;

import com.example.demo.admin.gecco.entity.CategoryType;
import com.geccocrawler.gecco.annotation.Gecco;
import com.geccocrawler.gecco.annotation.HtmlField;
import com.geccocrawler.gecco.annotation.Request;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

import java.util.List;

@Gecco(matchUrl = "https://www.797ii.com/htm/index.htm", pipelines = {"saveCategoryPipeline" },downloader = "myClientDownloader")
public class IndexPage implements HtmlBean {

    @Request
    private HttpRequest request;

    @HtmlField(cssPath = ".mainArea > ul > li")
    private List<CategoryType> categoryTypes;

    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }

    public List<CategoryType> getCategoryTypes() {
        return categoryTypes;
    }

    public void setCategoryTypes(List<CategoryType> categoryTypes) {
        this.categoryTypes = categoryTypes;
    }
}